<template>
  <div class="login">
    <el-row>
      <el-col :span="24">
        <h1>智慧社区</h1>
      </el-col>
    </el-row>

      <el-form ref="form" :model="form" label-width="100px">
        <el-form-item label="账号：" >
          <el-input v-model="form.username"></el-input>
        </el-form-item>
        <el-form-item label="密码：" >
          <el-input v-model="form.pass"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">登 录</el-button>
         
        </el-form-item>
      </el-form>
   
  </div>
</template>

<script>
// 原生axios
import axios from 'axios'
  export default {
    data(){
      return{
        form:{
          username:"qqq",
          pass:"qqq"
        }
      }
    },
    
    methods:{
      onSubmit(){
        axios.post('http://estate.eshareedu.cn/estate/api/administrator/checklogin', this.form)
        .then(function (response) {
          console.log(response);
        })
        .catch(function (error) {
          console.log(error);
        });
      }
    }
  }
</script>

<style lang="less" scoped>
@import url('../css/LoginView.less');
</style>